"""
1.定义父类 Start 初始化四个属性 getPoint() 返回*
2.定义子类 Line 继承Start父类  --先重写再扩展(super)
3.实例化对象
"""
class Start():
    def __init__(self,x,y,z,h):
        self.x = x
        self.y = y
        self.z = z
        self.h = h

    def getPoint(self):
        return "*"
class Line(Start):  # 需要初始化吗？
    def getPoint(self):  # 在子类里面直接使用父类的属性
        one = self.x - self.y
        two = self.z - self.h
        # *  -- 调用父类的getPoint()
        start = super().getPoint()
        print(start*one)
        print(start*two)

l = Line(12,10,14,5)
l.getPoint()